<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>网站信息管理</title>
		[#include "/html/include/easyuicss.html" /]
		[#include "/html/include/easyuijs.html" /]
	</head>
	<body class="easyui-layout" data-options="fit:true">

		<form id="roleForm" class="easyui-form" method="post" data-options="novalidate:true">
			<table class="tblEidt">
				<tr>
					<td class="tdText" style="width:15%;">
						首页<label style="color:red;">*</label>：
					</td>
					<td class="tdInput" style="width:85%;">
						<input class="easyui-textbox" name="home" value="${home}" style="width:80%;" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td class="tdText">
						网站标题<label style="color:red;">*</label>：
					</td>
					<td class="tdInput">
						<input class="easyui-textbox" name="title" value="${title}" style="width:80%;" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td class="tdText">
						网站关键字<label style="color:red;">*</label>：
					</td>
					<td class="tdInput">
						<input class="easyui-textbox" name="keywords" value="${keywords}" style="width:80%;" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td class="tdText">
						网站描述<label style="color:red;">*</label>：
					</td>
					<td class="tdInput">
						<input class="easyui-textbox" name="siteDesc" value="${description}" style="width:80%;height: 80px;" data-options="multiline:true,required:true" />
					</td>
				</tr>
			</table>
			<div class="edit-btn-group">
				<a href="javascript:;" class="easyui-linkbutton"
				   data-options="iconCls:'icon-ok'" style="width:80px"
				   onclick="saveSiteInfo(this);">保存</a>
			</div>
		</form>
	</body>
    <script type="text/javascript">
		function saveSiteInfo(obj){
			$(obj).linkbutton('disable');
			$('#roleForm').form('submit', {
				url: '${app}/sysmgr/site/save.do',
				onSubmit: function () {
					var valid = $(this).form('enableValidation').form('validate');
					if (!valid) {
						$(obj).linkbutton('enable');
					}
					return valid;
				},
				success: function (data) {
					var result = $.parseJSON(data);
					parent.easyui.msgShow('系统提醒', result.msg, 3000, 250, 100);
					$(obj).linkbutton('enable');
				}
			});
		}
    </script>
</html>